package demo.connectsrc;

public class OrderDetail {
    private String orderId;
    private String product;
    private double sum;

    public OrderDetail(String orderId, String product, double sum) {
        this.product = product;
        this.sum = sum;
        this.orderId = orderId;
    }

    public static OrderDetail of(String orderId, String product, double sum) {
        return new OrderDetail(orderId, product, sum);
    }

    public static OrderDetail empty() {
        return new OrderDetail("", "", 0);
    }

    @Override
    public String toString() {
        return "OrderDetail{"
                + "orderId= "
                + orderId
                + " product= "
                + product
                + " sum= "
                + sum
                + "}";
    }

    public double getSum() {
        return sum;
    }

    public void setSum(double sum) {
        this.sum = sum;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
}
